/**
 *******************************************************************************
 * @FileName  : main.c
 * @Author    : GaoQiu
 * @CreateDate: 2020-05-18
 * @Copyright : Copyright(C) GaoQiu
 *              All Rights Reserved.
 *******************************************************************************
 *
 * The information contained herein is confidential and proprietary property of
 * GaoQiu and is available under the terms of Commercial License Agreement
 * between GaoQiu and the licensee in separate contract or the terms described
 * here-in.
 *
 * This heading MUST NOT be removed from this file.
 *
 * Licensees are granted free, non-transferable use of the information in this
 * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
 *
 *******************************************************************************
 */
#include "user_main.h"
#include "app_config.h"
#include "PanSeries.h"

#include "stack/controller/ll_api.h"
#include "stack/controller/bb_api.h"

#include "utils/sys_time.h"
#include "bsp/bsp.h"

RAM_CODE void LL_IRQHandler(void)
{
	BLE_IRQHandler();
}

int main(void)
{
	/* System clock Initialization. */
	SysClkInit();

	/* GPIO define Initialization. */
	GPIO_DefInit();

	/* Track Initialization. */
	TrackSystemInit();

	/* Load Calibration Info. */
	LoadCalibrationInfo();

	/* setup */
	Setup();

	/* Print System Info */
	TrackPrintSystemInfo();

	/* BB Debug Signal Init. */
#if 1
	BB_DebugInit();
#endif

	for(;;)
	{
		Loop();

		TRACK_START();
	}
	/* return 0; */
}
